See Also

TcpStream Class  | TcpStream Members  | Overload List

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows ME, Windows 2000, Windows XP, Windows Server 2003, Windows Vista

Language

Visual Basic

C#

C++

C++/CLI

Show All

buffer
The storage location for the received data.
offset
The zero-based position in the buffer at which to store the received data.
size
The maximum number of bytes to read.
See Also Languages PowerTCP Email Validation for .NET

Read(Byte[],Int32,Int32) Method

Dart.PowerTCP.EmailValidation Namespace > TcpStream Class > Read Method : Read(Byte[],Int32,Int32) Method

Reads at least one byte of data from the stream and copies it into the provided buffer.

[Visual Basic]
Overloads Overrides Public Function Read( _    ByVal buffer() As Byte, _    ByVal offset As Integer, _    ByVal size As Integer _ ) As Integer
[C#]
public override int Read(    byte[] buffer,    int offset,    int size );
[C++]
public: int Read(    byte[]* buffer,    int offset,    int size ) override
[C++/CLI]
public: int Read(    bytearray<buffer>^ buffer,    int offset,    int size ) override

Parameters

buffer
The storage location for the received data.
offset
The zero-based position in the buffer at which to store the received data.
size
The maximum number of bytes to read.

Return Type

The total number of bytes read into the buffer.

Exceptions

ExceptionDescription
IOExceptionThrown when the stream is not Readable.
#ctorThrown when the receiving buffer is null.
#ctorThrown when the offset is less than zero or when size is less than or equal to zero.
#ctorThrown when the (offset + size) > buffer.Length.

Remarks

This is the standard method to use when reading a stream synchronously.

The return value may be less than the number of bytes requested if that many bytes are not currently available, or zero if the end of the stream has been reached. Applications must check this value to know how many bytes were read into the buffer.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows ME, Windows 2000, Windows XP, Windows Server 2003, Windows Vista

See Also

TcpStream Class  | TcpStream Members  | Overload List


Send comments on this topic.

Documentation version 1.0.3.0.

© 2008 Dart Communications.  All rights reserved.